//:C03:reinterpret_cast.cpp
#include <iostream>
const int sz = 100;

struct X { int a[sz]; };

void print(X *x)
{
    for(int i = 0; i < sz; i++)
    {
        std::cout << x->a[i] << ' ';
    }
    std::cout << '\n' << "-------------------" << '\n';
}

int main(void)
{
    X x;
    print(&x);
    int * xp = reinterpret_cast<int *>(&x);
    
    for(int *i = xp; i < xp + sz; i++)
    {
        *i = 0;
        //Can't use xp as an X8 at the point
        //unless your cast it back:
        print(reinterpret_cast<X*>(xp));
        //In this example, you can also just use 
        //the original identifier:
        print(&x);
    }
    return 0;
}